﻿using Microsoft.Extensions.DependencyInjection;
using NLog.Config;

namespace Xman.ActivityId
{
    public static class ActivityIdCollectionExtensions
    {
        public static IServiceCollection AddNLogActivityId(this IServiceCollection services)
        {
            ConfigurationItemFactory.Default.LayoutRenderers.RegisterDefinition("activityid", typeof(TraceActivityIdLayoutRenderer));
            return services;
        }
    }
}
